////////////////////////////////////////////////
// -- DepthHUD Lite                           //
// by Hurricaaane (Ha3)                       //
//                                            //
// http://www.youtube.com/user/Hurricaaane    //
//--------------------------------------------//
// Base label                                 //
////////////////////////////////////////////////

local PANEL = {}

function PANEL:Init()
	self.p_Type = 0
	self.p_FontSize = 1
	
end

function PANEL:SetTextAlign( iContentAlignment )
	self:SetContentAlignment( iContentAlignment )
	
end

function PANEL:SetFontType( sType )
	self.p_Type = (sType == "number") and 0
					or (sType == "text") and 1
					or (sType == "pixel") and 2
	
end

function PANEL:SetFontSize( iSize ) // 1 2 3 4
	self.p_FontSize = iSize
	
end

function PANEL:UpdateFont( )
	local sSize = (self.p_FontSize == 1) and "Small"
	  or (self.p_FontSize == 2) and "Regular"
	  or (self.p_FontSize == 4) and "Normal" or ""
	local sType = (self.p_Type == 0) and "Number"
					or (self.p_Type == 1) and "Text"
					or (self.p_Type == 2) and "Pixel" or ""
	
	self:SetFont( "DHLITE_" .. sSize .. sType )
	print(  "DHLITE_" .. sSize .. sType )
	
end


Derma_Hook( PANEL, "PerformLayout", "Layout", "HLabel" )
derma.DefineControl( "HLabel", "", PANEL, "DLabel" )
